
	app.controller('RegionIpHddTbCtrl',['$uibModalInstance','$scope','newCSV','DataService',RegionIpHddTbCtrl])
    

	function RegionIpHddTbCtrl($uibModalInstance,$scope,newCSV,DataService) {

        $scope.newCSV = newCSV;

        this.close = function () {
             $uibModalInstance.dismiss('close');  
        };

        this.submit = function(){
            var str = ''
            for(var i=0;i<newCSV.length;i++){
                DataService.restPostApi('pornographies/dateChangeByAjbh',newCSV[i])
                .then(function success (data) {


                },function error(data){
                    str+=(newCSV[i].ajbh+";")
                })
            }
            if(str==""){
                alert("操作成功!")
                $uibModalInstance.close('');
            }else{
                alert(str)
               
            }
        }
    };	
